package com.beyond.trace.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Date;

/**
 * @ClassName: FruitManage
 * @author: z越
 * @date: 2024/4/9  9:09
 * @description
 */
@Data
@TableName("t_fruit_manege")
@AllArgsConstructor
public class FruitManage {
    @TableId(type = IdType.AUTO)
    private Long id;
    /**水果名称*/
    private String name;
    /**价格*/
    private String price;
    /**地点*/
    private String address;
    /**水果价格时间*/
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date time;
    /**创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public FruitManage(String name, Date parse, String price, String address) {
        this.name = name;
        this.time = parse;
        this.address = address;
        this.price = price;
        this.createTime = new Date();
    }
}
